<template>
	<view>
	<view class="address">
		<picker mode="multiSelector" :range="address" @change="handle" value="index">
			<view>
				请选择您的邮寄地址:{{address[0][index[0]]}}--{{address[1][index[1]]}}--{{address[2][index[2]]}}
			</view>
		</picker>
	 </view>	
	<view class="goods">
		<image src="https://gw.alicdn.com/bao/upload/TB16Ya8qLb2gK0jSZK9XXaEgFXa.jpg_Q75.jpg"></image>
		<view class="right">
			<view class="tit">
				<view>Huawei/华为MatePad Pro平板电脑笔记本二合一新品轻薄全面屏影音无线充电</view>
				<text>¥3199</text>
			</view>
			<view class="btn">
				<button size="mini" type="warn" @click="sub">-</button>
				<text>{{ num }}</text>
				<button size="mini" type="warn" @click="add">+</button>
			</view>
		</view>
	</view>
	
</view>
</template>

<script>
	export default {
		data() {
			return {
				num: 1,
				address: [
					['请选择省级','广东省'],
					['请选择市级','广州市'],
					['请选择区级','白云区','荔湾区','天河区','越秀区']
				],
				index: [0,0,0]
			}
		},
		methods: {
			add:function() {
				if (this.num < 100){
					this.num++
				}
			},
			sub:function() {
				if (this.num > 0) {
					this.num--
				}
			},
			handle(e){
				this.index = e.target.value
			}
		}
	}
</script>

<style lang="scss">
	.goods {
		display: flex;
		margin: 30rpx;
		image {
			width: 600rpx;
			height: 300rpx;
		}
		.right {
			display: flex;
			flex-direction: column;
			justify-content: space-between;
			margin-left: 10rpx;
			.tit {
				font-size: 16px;
				text{
					display: inline-block;
					margin-top: 30rpx;
					color: #5f5f5f;
				}
			}
			.btn {
				margin-left: 180rpx;
				text {
					vertical-align: 15rpx;
					margin: 0 20rpx;
				}
			}
		}
	}
	.address {
		width: 720rpx;
		height: 100rpx;
		font-size: 28rpx;
		background-color: #da2911;
		color: #fff;
		border-radius: 20rpx;
		text-align: center;
		line-height: 100rpx;
		margin: 20rpx auto;
	}
</style>
